<template>
  <a-config-provider :locale="locale">
    <div id="app">
      <router-view />
    </div>
  </a-config-provider>
</template>
<script setup>
import { ref, onMounted, provide } from 'vue';
import zhCN from 'ant-design-vue/es/locale/zh_CN';// 引入antd中文包
import moment from 'moment';
import 'moment/locale/zh-cn';
import mitt from 'mitt';
const EventBus = mitt();
console.log(EventBus);
provide('EventBus', EventBus);
window.addEventListener('resize', ()=>{
  setRootFontSize();
})
moment.locale(zhCN.locale);
const locale = ref(zhCN);
onMounted(()=>{
  setRootFontSize();
})
/**设置html fontsize */
const setRootFontSize = () =>{
  let fz = window.innerWidth*16/1920;
  document.getElementsByTagName('html')[0].style.fontSize = fz + 'px';
}
</script>
<style lang="less">
#app {
  // font-family: Avenir, Helvetica, Arial, sans-serif;
  // font-family: PingFangSC-Semibold, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: white;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  font-size: 1rem;
}

/*控制整个滚动条*/
::-webkit-scrollbar {
  background-color: rgba(240, 240, 240, 0.1);
  width: 0.375rem;
  height: 0.625rem;
}

/*滚动条中间滑动部分*/
::-webkit-scrollbar-thumb {
  background-color: #a8a8a859;
  border-radius: 0.375rem;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(125, 125, 125, 0.8);
}
html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.ori_screen {
  width: 100%;
  height: 100%;
}
</style>
